/**
 * @Author YuanYuan
 * @Date 2022/4/23
 * @Time 19:33
 */
public class TestDemo {
    public static int MAX = 999;
    public static void main(String[] args) {
        for (int i = 0; i <= MAX; i++) {
            int sum = 0,ret = i;
            while(ret!=0) {
                sum += Math.pow(ret%10,3);
                ret /= 10;
            }
            if(sum == i) {
                System.out.println(i);
            }
        }
    }
}
